package main

import (
	"fmt"
	"go_data_structures_and_algorithms/system_class/section9/pojo"
)

func main() {

	trie := pojo.NewPreTrie()

	trie.Insert("sql")
	trie.Insert("sql")
	trie.Insert("sql")
	trie.Insert("sql")
	trie.Insert("ssd")
	trie.Insert("ssddddd")
	trie.Delete("ssd")
	trie.Search("sql")
	trie.Search("sqll")
	trie.Search("ssddddd")
	trie.Delete("sql")
	trie.Search("sql")

	number := trie.PreNumber("sq")
	fmt.Println("sq前缀的字符串有", number)
	number1 := trie.PreNumber("ss")
	fmt.Println("sq前缀的字符串有", number1)
}
